home *** CD-ROM | disk | FTP | other *** search
- Subject: v22i038: NN Newsreader, release 6.4, Part03/21
- Newsgroups: comp.sources.unix
- Approved: rsalz@uunet.UU.NET
- X-Checksum-Snefru: a72abfdc 479e02b2 d2851bdd f272ba25
-
- Submitted-by: "Kim F. Storm" <storm@texas.dk>
- Posting-number: Volume 22, Issue 38
- Archive-name: nn6.4/part03
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # The tool that generated this appeared in the comp.sources.unix newsgroup;
- # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
- # Contents: man/nn.1.C pack_name.c
- # Wrapped by storm@texas.dk on Sun May 6 18:19:20 1990
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 3 (of 22)."'
- if test -f 'man/nn.1.C' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'man/nn.1.C'\"
- else
- echo shar: Extracting \"'man/nn.1.C'\" \(41683 characters\)
- sed "s/^X//" >'man/nn.1.C' <<'END_OF_FILE'
- X.\" BEGINPART C
- X.SH CATCH UP
- XIf you have not read news for some time, there are probably more news
- Xthan you can cope with. Using the option \-\fBa0\fP \fInn\fP will put
- Xyou into \fBcatch-up mode\fP.
- X.LP
- XThe first question you will get is whether to catch up interactively
- Xor automatically. If you instruct \fInn\fP to catch up automatically,
- Xit will simply mark all articles in all groups as read, thus bringing
- Xyou \fIcompletely up-to-date\fP.
- X.LP
- XIf you choose the interactive mode, \fInn\fP will locate all groups
- Xwith unread articles, and for each group it will prompt you for an
- Xaction to take on the group. An action is selected using a single
- Xletter followed by \fBreturn\fP. The following actions are available:
- X.TP
- X.B y
- XMark all articles as read in current group.
- X.TP
- X.B n
- XDo not update group (this is the default action if you just hit
- X\fBreturn\fP).
- X.TP
- X.B r
- XEnter reading mode to read the group.
- X.TP
- X.B U
- XUnsubscribe to the group.
- X.TP
- X.B ?
- XGive a list of actions.
- X.TP
- X.B q
- XQuit.
- XWhen you quit, \fInn\fP will ask whether the
- Xrest of the groups should be updated unconditionally or whether they
- Xshould remain unread.
- X.SH VARIABLES AND OPTIONS
- XIt is possible to control the behaviour of \fInn\fP through the
- Xsetting (and unsetting) of the variables described below. There are
- Xseveral ways of setting variables:
- X.br
- X\- Through command line options when \fInn\fP is invoked.
- X.br
- X\- Through global \fBset\fP commands in the init file.
- X.br
- X\- Through \fBset\fP or \fBlocal\fP commands executed from entry macros.
- X.br
- X\- Through the \fB:set\fP extended command when you run \fInn\fP.
- X.LP
- XThere are four types of variables:
- X.br
- X\- Boolean variables
- X.br
- X\- Integer variables
- X.br
- X\- String variables
- X.br
- X\- Key variables
- X.LP
- XBoolean variables control a specific function in \fInn\fP, e.g.
- Xwhether the current time is shown in the prompt line. A boolean
- Xvariable is set to
- X.B true
- Xwith the command
- X.br
- X \fBset\fP \fIvariable\fP
- X.br
- Xand it is set to
- X.B false
- Xwith either of the following (equivalent) commands:
- X.br
- X \fBunset\fP \fIvariable\fP
- X.br
- X \fBset no\fP\fIvariable\fP
- X.LP
- XYou can also toggle the value of a boolean variable using the command:
- X.br
- X \fBtoggle\fP \fIvariable\fP
- X.LP
- XFor example:
- X.br
- X \fBset\fP time
- X.br
- X \fBunset\fP time
- X.br
- X \fBset\fP notime
- X.br
- X \fBtoggle\fP time
- X.LP
- XInteger variables control an amount e.g. the size of the preview
- Xwindow, or the maximum number of articles to read in each group. They
- Xare set with the following command:
- X.br
- X \fBset\fP \fIvariable value\fP
- X.br
- XIn some cases, not setting an integer value has a special meaning,
- Xfor example, not having a minimal preview window or reading all
- Xarticles in the groups no matter how many there are. The special
- Xmeaning can be re-established by the following command:
- X.br
- X \fBunset\fP \fIvariable\fP
- X.br
- XFor example:
- X.br
- X \fBset\fP window 7
- X.br
- X \fBunset\fP limit
- X.br
- X.LP
- XString variables may specify directory names, default values for
- Xprompts, etc. They are set using the command
- X.br
- X \fBset\fP \fIvariable string\fP
- X.br
- XExcept for file and directory names, the
- X.I string
- Xvalue starts at the first non-blank character after the variable name
- Xand continues to the end of the line \fIincluding all trailing
- Xblanks on the line\fP!
- X.LP
- XKey variables control the keys used to control special functions
- Xduring user input such as line editing and completion. They are set
- Xusing the command
- X.br
- X \fBset\fP \fIvariable key-name\fP
- X.br
- X.LP
- XThe current variable settings can be shown with the
- X.B :set
- Xcommand without arguments.
- X.LP
- XVariables are global by default, but a local instantiation of the
- Xvariable can be created using the \fB:local\fP command. The local
- Xvariable will overlay the global variable as long as the current group
- Xis active, i.e. the global variable will be used again when you exit
- Xthe current group. The initial value of the local variable will be
- Xthe same as the global variable, unless a new value is specified in
- Xthe \fB:local\fP command:
- X.sp 0.5v
- X \fB:local\fP \fIvariable\fP [ \fIvalue\fP ]
- X.sp 0.5v
- X.LP
- XThe following variables are available:
- X.TP
- X\fBalso-subgroups\fP (boolean, default true)
- XWhen set, a group name in the presentation sequence will also cause
- Xall the subgroups of the group to be included, for example, comp.unix
- Xwill also include comp.unix.questions, etc. When \fBalso-subgroups\fP
- Xis not set, subgroups are only included if the group name is followed
- Xby a `.' in which case the main group is \fInot\fP included, i.e.
- X`comp.unix' is not included when `comp.unix.' is specified in the
- Xpresentation sequence, and vice-versa. Following a group name by an
- Xasterisk `*', e.g. comp.unix*, will include the group as well as all
- Xsubgroups independently of the setting of \fBalso-subgroups\fP.
- X.TP
- X\fBappend-signature-mail\fP (boolean, default false)
- XWhen false, it is assumed that the .signature file is automatically
- Xappended to responses sent via E-mail. If true, .signature will be
- Xappended to the letter (see query-signature).
- X.TP
- X\fBappend-signature-post\fP (boolean, default false)
- XWhen false, it is assumed that the .signature file is automatically
- Xappended to posted articles. If true, .signature will explicitly be
- Xappended to posted articles (see query-signature).
- X.TP
- X\fBattributes\fP \fIsymbols\fP (string, default ....)
- XEach element in this string represents a symbol used to represent an
- Xarticle attribute when displayed on the screen. See the section on
- XMarking Articles and Attributes.
- X.TP
- X\fBauto-junk-seen\fI (boolean, default true)
- XWhen set, articles which have the \fIseen attribute\fP (,) will be marked
- Xread when the current group is left. If not set, these articles will
- Xstill be either unread or marked seen the next time the group is
- Xentered (see also \fBconfirm-junk-seen\fP and \fBretain-seen-status\fI).
- X.TP
- X\fBauto-preview-mode\fP (boolean, default false)
- XEnables \fIAuto Preview Mode\fP. In this mode, selecting an article
- Xon the menu using its article id (letter a-z) will enter preview mode
- Xon that article immediately. Furthermore, the `n' {\fBnext-article\fP}
- Xcommand will preview the next article on the menu only if it has the
- Xsame subject as the current article; otherwise, it will return to the
- Xmenu with the cursor placed on the next article. The \fBcontinue\fP
- Xcommand at the end of the article and the `=' {\fBgoto-menu\fP}
- Xreturns to the menu immediately as usual.
- X.TP
- X\fBbackup\fP (boolean, default true)
- XWhen set, a copy of the initial .newsrc and select files will save be
- Xthe first time they are changed. \fInn\fP remembers the initial
- Xcontents of these files internally, so the backup variable can be set
- Xany time if not set on start-up.
- X.TP
- X\fBbackup-suffix\fP \fIsuffix\fP (string, default ".bak")
- XThe suffix appended to file names to make the corresponding backup
- Xfile name (see \fBbackup\fP).
- X.TP
- X\fBbug-report-address\fP \fIaddress\fP (string, default nn-bugs@dkuug.dk)
- XThe mail address to which bug reports created with the \fB:bug\fP
- Xcommand are sent.
- X.TP
- X\fBcase-fold-search\fP (boolean, default true)
- XWhen set, string and regular expression matching will be case
- Xindependent. This is related to all commands matching on names or
- Xsubjects, except in connection with auto-kill and auto-select where
- Xthe individual kill file entries specifies this property.
- X.TP
- X\fBcollapse-subject\fP \fIoffset\fP (integer, default 25)
- XWhen set (non-negative), subject lines which are too long to be
- Xpresented in full on the menus will be "collapsed" by removing a
- Xsufficient number of characters from the subject starting at the given
- X\fIoffset\fP in the subject. This is useful in source groups where
- Xthe "Part (01/10)" string sometimes disappears from the menu. When
- Xnot set (or negative), the subjects are truncated.
- X.TP
- X\fBcolumns\fP \fIcol\fP (integer, default screen width)
- XThis variable contains the screen width i.e. character positions per
- Xline.
- X.TP
- X\fBcomp1-key\fP \fIkey\fP (key, default \fBspace\fP)
- XThe key which gives the first/next completion, and the default value
- Xwhen \fInn\fP is prompting for a string, e.g. a file name.
- X.TP
- X\fBcomp2-key\fP \fIkey\fP (key, default \fBtab\fP)
- XThe key which ends the current completion and gives the first
- Xcompletion for the next component
- Xwhen \fInn\fP is prompting for a string, e.g. a file name.
- X.TP
- X\fBcompress\fP (boolean, default false)
- XThis variable controls whether text compression (see the
- X\fBcompress\fP command) is turned on or off when an article is
- Xshown. The compression is still toggled for the current article with
- Xthe \fBcompress\fP command key.
- X.TP
- X\fBconfirm-append\fP (boolean, default false)
- XWhen set, \fInn\fP will ask for confirmation before appending an
- Xarticle to an existing file (see also \fBconfirm-create\fP).
- X.TP
- X\fBconfirm-auto-quit\fP (boolean, default false)
- XWhen set, \fInn\fP will ask for confirmation before quitting after
- Xhaving read the last group. If not confirmed, \fInn\fP will recycle
- Xthe presentation sequence looking for groups that were skipped with
- Xthe `N' {\fBnext-group\fP} command. But it will not look for new
- Xarticles arrived since the invokation of \fInn\fP.
- X.TP
- X\fBconfirm-create\fP (boolean, default true)
- XWhen set, \fInn\fP will ask for confirmation before creating a new
- Xfile or directory when saving or unpacking an article (see also
- X\fBconfirm-append\fP).
- X.TP
- X\fBconfirm-entry\fP (boolean, default false)
- XWhen set, \fInn\fP will ask for confirmation before entering a group
- Xwith more than \fBconfirm-entry-limit\fP unread articles (on the first
- Xmenu level). It is useful on slow terminals if you don't want to wait
- Xuntil \fInn\fP has drawn the first menu to be able to skip the group.
- X Answering no to the "Enter?" prompt will cause \fInn\fP to skip to
- Xthe next group without marking the current group as read. If you
- Xanswer by hitting \fBinterrupt\fP, \fInn\fP will ask the question
- X"Mark as read?" which allows you to mark the current group as read
- Xbefore going to the next group. If this second question is also
- Xanswered by hitting \fBinterrupt\fP, \fInn\fP will quit immediately.
- X.TP
- X\fBconfirm-entry-limit\fP \fIarticles\fP (integer, default 0)
- XSpecifies the minimum number of unread articles in a group for which
- Xthe \fBconfirm-entry\fP functionality is activated.
- X.TP
- X\fBconfirm-junk-seen\fP (boolean, default false)
- XWhen set, \fInn\fP will require confirmation before marking seen
- Xarticles as read when \fBauto-junk-seen\fP is set.
- X.TP
- X\fBconfirm-messages\fP (boolean, default false)
- XIn some cases, \fInn\fP will sleep one second (or more) when it has shown a
- Xmessage to the user, e.g. in connection with macro debugging. Setting
- X.B confirm-messages
- Xwill cause \fInn\fP to
- X\fIwait\fP for you to confirm all messages by hitting any
- Xkey. (It will show the symbol <> to indicate that it is awaiting
- Xconfirmation.)
- X.TP
- X\fBcross-filter-seq\fP (boolean, default true)
- XWhen set, cross posted articles will be presented in the first
- Xpossible group, i.e. according to the current presentation sequence
- X(\fIcross\fP-post \fIfilter\fPing on \fIseq\fPuence). The article is
- Xautomatically marked read in the other cross posted groups unless you
- Xunsubscribe to the first group in which it was shown before reading
- Xthe other groups. Likewise, it is sufficient to leave the article
- Xunread in the first group to keep it for later handling.
- X If not set, cross-postings are shown in the first group occurring on
- Xthe Newsgroups: line which the user subscribes to (i.e. you let the
- Xposter decide which group is most appropriate to read his posting).
- X.TP
- X\fBcross-post\fP (boolean, default false)
- XNormally, \fInn\fP will only show cross-posted articles in the first
- Xsubscribed group on the Newsgroups: line. When
- X.B cross-post
- Xis set, \fInn\fP will show cross-posted articles in all subscribed
- Xgroups to which they are posted.
- X.TP
- X\fBdata-bits\fP \fIbits\fP (integer, default 7)
- XWhen set to 7, \fInn\fP will display characters with the 8th bit set
- Xusing a meta-notation \fBM-\fP\fI7bit-char\fP. If set to 8, these
- Xcharacters are sent directly to the screen (unless \fBmonitor\fP is
- Xset).
- X.TP
- X\fBdate\fP (boolean, default true)
- XIf set \fInn\fP will show the article posting date when articles are
- Xread.
- X.TP
- X\fBdebug\fP \fImask\fP (integer, default 0)
- XLook in the source if you are going to use this.
- X.TP
- X\fBdecode-header-file\fP \fIfile\fP (string, default "Decode.Headers")
- XThe name of the file in which the header and initial text of articles
- Xdecoded with the \fB:decode\fP command is saved. Unless the file name
- Xstarts with a `/', the file will be created in the same directory as
- Xthe decoded files. The information is not saved if this variable is
- Xnot set.
- X.TP
- X\fBdecode-skip-prefix\fP \fIN\fP (integer, default 2)
- XWhen non-null, the \fB:decode\fP command will automatically skip
- X\fIupto\fP \fIN\fP characters at the beginning of each line to find
- Xvalid uuencoded data. This allows \fInn\fP to automatically decode
- X(multi-part) postings which are both uuencoded and packed with shar.
- X.TP
- X\fBdefault-distribution\fP \fIdistr\fP (string, default not set)
- XThe distribution to use as the default suggestion when posting
- Xarticles using the \fBpost\fP command. If it is not set, the
- Xfirst component of the group name is used as the suggested
- Xdistribution, e.g. `comp' when posting to comp.whatever.
- X.TP
- X\fBdefault-save-file\fP \fIfile\fP (string, default +$F)
- XThe default save file used in quick save mode. It can also be
- Xspecified using the abbreviation "+" as the file name in normal save
- Xmode.
- X.TP
- X\fBdelay-redraw\fP (boolean, default false)
- XNormally, \fInn\fP will redraw the screen after extended
- Xcommands (:cmd) that clear the screen. When \fBdelay-redraw\fP is set
- X\fInn\fP will prompt for another extended command instead of redrawing
- Xthe screen (hit \fBreturn\fP to redraw).
- X.TP
- X\fBedit-patch-command\fP (boolean, default true)
- XWhen true, the \fB:patch\fP command will show the current
- X\fBpatch-command\fP and give you a chance to edit it before applying
- Xit to the articles.
- X.TP
- X\fBedit-print-command\fP (boolean, default true)
- XWhen true, the \fBprint\fP command will show the current \fBprinter\fP
- Xcommand and give you a chance to edit it before printing the articles.
- XOtherwise the articles are just printed using the current \fBprinter\fP
- Xcommand.
- X.TP
- X\fBedit-response-check\fP (boolean, default true)
- XWhen editing a response to an article, it normally does not have any
- Xmeaning to send the initial file prepared by \fInn\fP unaltered, since
- Xit is either empty or only contains included material. When this
- Xvariable is set, exiting the editor without having changed the file
- Xwill automatically abort the response action without confirmation.
- X.TP
- X\fBedit-unshar-command\fP (boolean, default false)
- XWhen true, the \fB:unshar\fP command will show the current
- X\fBunshar-command\fP and give you a chance to edit it before applying
- Xit to the articles.
- X.TP
- X\fBeditor\fP \fIcommand\fP (string, default not set)
- XWhen set, it will override the current EDITOR environment variable
- Xwhen editing responses and new articles.
- X.TP
- X\fBentry-report-limit\fP \fIarticles\fP (integer, default 300)
- XNormally, \fInn\fP will just move the cursor to the upper left corner
- Xof the screen while it is reading articles from the database on
- Xentry to a group. For large groups this may take more than a fraction
- Xof a second, and \fInn\fP can then report what it is doing. If
- Xit must read more articles than the number specified by this variable,
- X\fInn\fP will report which group and how many articles it is reading.
- X.TP
- X\fBerase-key\fP \fIkey\fP (key, default tty erase key)
- XThe key which erases the last input character
- Xwhen \fInn\fP is prompting for a string, e.g. a file name.
- X.TP
- X\fBexpert\fP (boolean, default false)
- XIf set \fInn\fP will use slightly shorter prompts (e.g. not tell you
- Xthat ? will give you help), and be a bit less verbose in a few other
- Xcases (e.g. not remind you that posted articles are not available
- Xinstantly).
- X.TP
- X\fBexpired-message-delay\fP \fIpause\fP (integer, default 1)
- XIf a selected article is found to have been expired, \fInn\fP will
- Xnormally give a message about this and sleep for a number of seconds
- Xspecified by this variable. Setting this variable to zero will still
- Xmake \fInn\fP give the message without sleeping afterwards. Setting
- Xit to -1 will cause the message not to be shown at all.
- X.TP
- X\fBflow-control\fP (boolean, default true)
- XWhen set, \fInn\fP will turn on xon/xoff flow-control before writing
- Xlarge amounts of text to the screen. This should guard against
- Xlossage of output, but in some network configurations it has had the
- Xopposite effect, losing several lines of the output. This variable
- Xis always true on systems with CBREAK capabilities which can do single
- Xcharacter reads without disabling flow control.
- X.TP
- X\fBflush-typeahead\fP (boolean, default false)
- XWhen true, \fInn\fP will flush typeahead prior to reading commands
- Xfrom the keyboard. It will not flush typeahead while reading
- Xparameters for a command, e.g. file names etc.
- X.TP
- X\fBfolder\fP \fIdirectory\fP (string, default ~/News)
- XThe full pathname of the
- X.I folder directory
- Xwhich will replace the + in folder names. It will be initialized from
- Xthe FOLDER environment variable if it is not set in the
- X.I init
- Xfile.
- X.TP
- X\fBfsort\fP (boolean, default true)
- XWhen set, folders are sorted alphabetically according to the subject
- X(and age).
- XOtherwise, the articles in
- Xa folder will be presented in the sequence in which they were saved.
- X.TP
- X\fBheader-lines\fP \fIlist\fP (string, no default)
- XWhen set, it determines the list of header fields that are shown when
- Xan article is read instead of the normal one line header showing the
- Xauthor and subject. See the full description in the section on
- XCustomized Article Headers below.
- X.TP
- X\fBhelp-key\fP \fIkey\fP (key, default \fB?\fP)
- XThe key which ends the current completion and gives a list of possible
- Xcompletions for the next component
- Xwhen \fInn\fP is prompting for a string, e.g. a file name.
- X.TP
- X\fBinclude-art-id\fP (boolean, default false)
- XThe first line in a response with included material normally reads
- X\&"...somebody... writes:" without a reference to the specific article
- Xfrom which the quotation was taken (this is found in the References:
- Xline). When this variable is set, the line will also include the
- Xarticle id of the referenced article: "In ...article... ... writes:".
- X.TP
- X\fBinclude-full-header\fP (boolean, default false)
- XWhen set, the \fBmail\fP (M) command will always include the full
- Xheader of the original article. If it is not set, it only includes
- Xthe header when the article is forwarded without being edited.
- X.TP
- X\fBincluded-mark\fP \fIstring\fP (string, default ">")
- XThis string is prefixed to all lines in the original article that are
- Xincluded in a reply or a follow-up. (Now you have the possibility to
- Xchange it, but please don't. Lines with a mixture of prefixes like
- X.br
- X : orig-> <> } ] #- etc.
- X.br
- Xare very difficult to comprehend. Let's all use the standard folks!
- X(And hack inews if it is the 50% rule that bothers you.)
- X.TP
- X\fBkeep-unsubscribed\fP (boolean, default true)
- XWhen set, unsubscribed groups are kept in .newsrc. If not set,
- X\fInn\fP will automatically remove all unsubscribed from .newsrc if
- X\fBtidy-newsrc\fP is set. See also \fBunsubscribe-mark-read\fP.
- X.TP
- X\fBkill\fP (boolean, default true)
- XIf set, \fInn\fP performs automatic kill and selection based on the
- X.I kill
- Xfile.
- X.TP
- X\fBkill-key\fP \fIkey\fP (key, default tty kill key)
- XThe key which deletes the current line
- Xwhen \fInn\fP is prompting for a string, e.g. a file name.
- X.TP
- X\fBlayout\fP \fInumber\fP (integer, default 1)
- XSet the menu layout. The argument must be a number between 0 and 4.
- X.TP
- X\fBlimit\fP \fImax-articles\fP (integer, default infinite)
- X.I Limit
- Xthe maximum number of articles presented in each group to
- X.I max-articles.
- XThe default is to present
- X.I all
- Xunread articles no matter how many there are. Setting this variable,
- Xonly the most recent
- X.I max-articles
- Xarticles will be presented, but all the articles will still be marked
- Xas read. This is useful to get up-to-date quickly if you have not
- Xread news for a longer period.
- X.TP
- X\fBlines\fP \fIlin\fP (integer, default screen hight)
- XThis variable contains the screen hight i.e. number of lines.
- X.TP
- X\fBlong-menu\fP (boolean, default false)
- XIf set \fInn\fP will not put an empty line after the header line and
- Xan empty line before the prompt line; this gives you two extra menu
- Xlines.
- X.TP
- X\fBmacro-debug\fP (boolean, default false)
- XIf set \fInn\fP will trace the execution of all macros. Prior to the
- Xexecution of each command or operation in a macro, it will show the
- Xname of the command or the input string or key stroke at the bottom of
- Xthe screen.
- X.TP
- X\fBmail\fP \fIfile\fP (string, default not set)
- X\fIfile\fP must be a full path name of a file. If defined, \fInn\fP will
- Xcheck for arrival of new mail every minute or so by looking at the
- Xspecified file.
- X.TP
- X\fBmail-format\fP (boolean, default false)
- XWhen set, \fInn\fP will save articles in a format that is compatible
- Xwith normal mail folders.
- X.TP
- X\fBmail-header\fP \fIheaders\fP (string, default not set)
- XThe \fIheaders\fP string specifies one or more extra header lines
- X(separated by semi-colons `;') which are added to the header of mail
- Xsent from \fInn\fP using the \fBreply\fP and \fBmail\fP commands. For
- Xexample:
- X.br
- X set mail-header Reply-To: storm@texas.dk
- X.br
- X.TP
- X\fBmail-record\fP \fIfile\fP (string, default not set)
- X\fIfile\fP must be a full path name of a file. If defined, all replies and
- Xmail will be saved in this file in standard
- X.I mailbox
- Xformat, i.e. you can use you favourite mailer (and \fInn\fP) to look at
- Xthe file.
- X.TP
- X\fBmail-script\fP \fIfile\fP (string, default not set)
- XWhen set, \fInn\fP will use the specified file instead of the standard
- X\fIaux\fP script when executing the \fBreply\fP and \fBmail\fP
- Xcommands.
- X.TP
- X\fBmailer\fP \fIshell-command\fP (string, default REC_MAIL)
- XThe program which is invoked by \fInn\fP to deliver a message to the
- Xmail transport. The program will be given a complete mail message
- Xincluding a header containing the recipient's address. See also
- X\fBmailer-pipe-input\fP.
- X.TP
- X\fBmailer-pipe-input\fP (boolean, default true)
- XWhen set, the message to be sent will be piped into the \fBmailer\fP
- Xprogram. Otherwise, the file containing the message will be given as
- Xthe first (and only) argument to the \fBmailer\fP command.
- X.TP
- X\fBmark-overlap\fP (boolean, default false)
- XWhen set, \fInn\fP will draw a line (using the underline capabilities
- Xof the terminal if possible) to indicate the end of the overlap (see the
- X\fBoverlap\fP variable).
- X.TP
- X\fBmin-window\fP \fIsize\fP (integer, default 7)
- XWhen the \fBwindow\fP variable is not set, \fInn\fP will clear the
- Xscreen to preview an article if there are less than \fIsize\fP unused
- Xlines at the bottom of the menu screen.
- X.TP
- X\fBmmdf-format\fP (boolean, default false)
- XWhen set, \fInn\fP will save articles in MMDF format.
- X.TP
- X\fBmonitor\fP (boolean, default false)
- XWhen set, \fInn\fP will show
- X.I all
- Xcharacters in the received messages using a "cat -v" like format.
- XOtherwise, only the printable characters are shown (default).
- X.TP
- X\fBnew-group-action\fP \fIaction\fP (integer, default 3)
- XThis variable controls how new groups are treated by \fInn\fP. It is
- Xan integer variable, and the following values can be used. Some of
- Xthese actions (marked with an *) will only work when
- X\fBkeep-unsubscribed\fP is set, since the presence of a group in
- X\&.newsrc is the only way to recongnize it as an old group:
- X.sp 0.5v
- X\fB0\fP) Ignore groups which are not in \&.newsrc. This will obviously
- Xinclude new groups.
- X.sp 0.5v
- X\fB1\fP*) Groups not in \&.newsrc are considered to be new, and are
- Xinserted at the beginning of the \&.newsrc file.
- X.sp 0.5v
- X\fB2\fP*) Groups not in \&.newsrc are considered to be new, and are
- Xappended to the end of the \&.newsrc file.
- X.sp 0.5v
- X\fB3\fP) New groups are recognized via a time-stamp saved in the
- Xfile \&.nn/LAST and in the database, i.e. it is not dependent on the
- Xgroups currently in \&.newsrc. The new groups are automatically
- Xappended to \&.newsrc with subscription. Old groups not present in
- X\&.newsrc will be considered to be unsubscribed.
- X.sp 0.5v
- X\fB4\fP) As \fB3\fP, but the user is asked to confirm that the new
- Xgroup should be appended to \&.newsrc. If rejected, the group will not
- Xbe appended to \&.newsrc, and thus be regarded as unsubscribed.
- X.sp 0.5v
- X\fB5\fP) As \fB4\fP, except that the information is stored in a
- Xformat compatible with the \fIrn\fP news reader (\&.rnlast). This needs
- Xto be tested!
- X.TP
- X\fBnews-header\fP \fIheaders\fP (string, default not set)
- XThe \fIheaders\fP string specifies one or more extra header lines
- X(separated by semi-colons `;') which are added to the header of
- Xarticles posted from \fInn\fP using the \fBfollow\fP and \fBpost\fP
- Xcommands.
- X.TP
- X\fBnews-record\fP \fIfile\fP (string, default not set)
- XSave file for follow-ups and postings. Same rules and format as the
- X\fBmail-record\fP variable.
- X.TP
- X\fBnews-script\fP \fIfile\fP (string, default not set)
- XWhen set, \fInn\fP will use the specified file instead of the standard
- X\fIaux\fP script when executing the \fBfollow\fP and \fBpost\fP
- Xcommands.
- X.TP
- X\fBnewsrc\fP \fIfile\fP (string, default "~/.newsrc")
- XSpecifies the file used by \fInn\fP to register which groups and
- Xarticles have been read. The default setting corresponds to the
- X\&.newsrc file used by other news readers. Notice that \fInn\fP release
- X6.4 \fIdoes allow\fP individual articles to be marked unread, and some
- Xarticles marked unread, and thus no longer messes up \&.newsrc for other
- Xnews readers!
- X.TP
- X\fBnntp-cache-dir\fP \fIdirectory\fP (string, default "~/.nn")
- XWhen NNTP is used, \fInn\fP needs to store articles temporarily on
- Xdisk. This variable specifies which directory \fInn\fP will use to
- Xhold these files. The default value may be changed during
- Xconfiguration. This variable can only be set in the init file.
- X.TP
- X\fBnntp-cache-size\fP \fIsize\fP (integer, default 10, maximum 10)
- XSpecifies the number of temporary files in the nntp cache. The
- Xdefault and maximum values may be changed during configuration.
- X.TP
- X\fBnntp-debug\fP (boolean, default false)
- XWhen set, a trace of the nntp related traffic is displayed in the
- Xmessage line on the screen.
- X.TP
- X\fBold\fP [\fImax-articles\fP] (integer, default not set)
- XWhen
- X.B old
- Xis set, \fInn\fP will present (or scan) all (or the last
- X\fImax-articles\fP) unread as well as
- Xread articles. While
- X.B old
- Xis set, \fInn\fP will
- X.I never
- Xmark any unread articles as read.
- X.TP
- X\fBorig-to-include-mask\fP \fIN\fP (integer, default 3)
- XWhen replying to an article, \fInn\fP will include some of the header
- Xlines which may be used to construct a proper mail address for the
- Xposter of the original article. These addresses are placed on
- X\fIOrig-To:\fP lines in the reply header and will automatically be
- Xremoved before the letter is sent. This variable specifies which
- Xheaders from the article are included; its value \fIN\fP is the sum of
- Xthe following values:
- X.br
- X 1: \fIReply-To:\fP
- X.br
- X 2: \fIFrom:\fP
- X.br
- X 4: \fIPath:\fP
- X.TP
- X\fBoverlap\fP \fIlines\fP (integer, default 2)
- XSpecifies the number of overlapping lines from one page to the next
- Xwhen paging through an article in reading mode.
- XThe last line from the previous page
- Xwill be underlined if the terminal has that capability.
- X.TP
- X\fBpager\fP \fIshell-command\fP (string, default $PAGER)
- XThis is the pager used by the \fB:admin\fP command (and \fInnadmin\fP)
- Xwhen it executes certain commands, e.g. grepping in the Log file.
- X.TP
- X\fBpatch-command\fP \fIshell-command\fP (string, default "patch -p0")
- XThis is the command which is invoked by the \fB:patch\fP command.
- X.TP
- X\fBpreview-continuation\fP \fIcond\fP (integer, default 12)
- XThis variable determines on what terms the following article should be
- Xautomatically shown when previewing an article, and the
- X\fBnext-article\fP command is used, or \fBcontinue\fP is used at the
- Xend of the article. The following values
- Xcan be used:
- X.br
- X\fB0\fP \- never show the next article (return to the menu).
- X.br
- X\fB1\fP \- always show the next article (use 'q' to return to the menu).
- X.br
- X\fB2\fP \- show the next article if it has the same subject as the
- Xcurrent article, else return to the menu.
- X.br
- XThe value should be the \fIsum\fP of two values: one for the action
- Xafter using \fBcontinue\fP on the last page of the article, and one
- Xfor the action performed when the \fBnext-article\fP command is used
- X\fImultiplied by 10\fP.
- X.TP
- X\fBpreview-mark-read\fP (boolean, default true)
- XWhen set, previewing an article will mark the article as read.
- X.TP
- X\fBprinter\fP \fIshell-command\fP (string, default is system dep.)
- XThis is the default value for the
- X.B print
- Xcommand. It should include an option which prevents the spooler from
- Xechoing a job-id or similar to the terminal to avoid problems with
- Xscreen handling (e.g. lp -s on System V).
- X.TP
- X\fBquery-signature\fP (boolean, default ...)
- XWill cause \fInn\fP to require confirmation before appending
- Xthe \&.signature file to out-going mail or news if the corresponding
- X\fBappend-sig-\fP... variable is set.
- X.TP
- X\fBquick-count\fP (boolean, default true)
- XWhen set, calculating the total number of unread articles at start-up
- Xis done by simple subtracting the first unread article number from the
- Xtotal number of articles in each group. This is very fast, and fairly
- Xaccurate but it may be a bit too large. If not set, each line in
- X.newsrc will be interpreted to count every unread article, thus giving
- Xa very accurate number. This variable is also used by \fInncheck\fP.
- X.TP
- X\fBquick-save\fP (boolean, default false)
- XWhen set, \fInn\fP will not prompt for a file name when an article is
- Xsaved (unless it belongs to a folder).
- XInstead it uses the save file specified for the current group in the
- Xinit file or the default save file.
- X.TP
- X\fBre-layout\fP \fIN\fP (integer, default 0)
- XNormally on the menu, \fInn\fP will prefix the subject a number of
- X`>'s corresponding to the number of references on the References:
- Xline. The \fBre-layout\fP variable may be set to use a different
- Xprefix on the subjects:
- X.br
- X.nf
- X 0: One `>' per reference is shown (default).
- X 1: A single `>' is shown if the Subject contains Re:.
- X 2: The number of references is shown as `n>'
- X 3: A single Re: is shown.
- X.fi
- X.TP
- X\fBrecord\fP \fIfile\fP (string, no default)
- XSetting this
- X.I pseudo
- Xvariable will set both the \fBmail-record\fP and the
- X\fBnews-record\fP variables to the specified pathname.
- X.TP
- X\fBrepeat\fP (boolean, default false)
- XWhen set, \fInn\fP will not eliminate duplicated subject lines on
- Xmenus (I cannot imagine why anyone should want that, but....)
- X.TP
- X\fBrepeat-group-query\fP (boolean, default false)
- XWhen set, invoking \fInn\fP with the \fB\-g\fP option will always
- Xrepeat the query for a group to enter until you quit explicitly.
- X(Same as setting the \fB\-r\fP option permanently).
- X.TP
- X\fBresponse-check-pause\fP \fIpause\fP (integer, default 2)
- XSpecifies the number of seconds to wait after posting an article to
- Xsee whether the action *might* have failed. Some commands run in the
- Xbackground and may thus not have completed during this period, so even
- Xwhen \fInn\fP says "Article posted", it may still fail (in which case
- Xyou are informed via mail).
- X.TP
- X\fBresponse-default-answer\fP \fIaction\fP (string, default "send")
- XThe default action to be taken when hitting \fBreturn\fP to the
- X"response action" prompt (abort, edit, send, view, write). If it is
- Xunset, no default action is defined.
- X.TP
- X\fBretain-seen-status\fP (boolean, default false)
- XNormally, seen articles will just be unread the next time the group is
- Xentered (unless they were marked read by \fBauto-junk-seen\fP). If
- X\fBretain-seen-status\fP is set, the seen attribute on the articles
- Xwill survive to the next time the group is entered. (This is not
- Xrecommended because it may result in very large select files).
- X.TP
- X\fBretry-on-error\fP \fItimes\fP (integer, default 0)
- XWhen set, \fInn\fP will try the specified number of \fItimes\fP to
- Xopen an article before reporting that the article does not exist
- Xanymore. This may be necessary in some network environments.
- X.TP
- X\fBsave-counter\fP \fIformat\fP (string, default "%d")
- XThis is the printf-format which \fInn\fP uses to create substitution
- Xstring for the trailing * in save file names. You can set this to
- Xmore complex formats if you like, but be sure that it will produce
- Xdifferent strings for different numbers. An alternative format which
- Xseems to be popular is ".%02d" .
- X.TP
- X\fBsave-counter-offset\fP \fIN\fP (integer, default 0)
- XNormally, file names created with the \fIpart.*\fP form will
- Xsubstitute the \fI*\fP with successive numbers starting from one.
- XSetting this variable will cause these numbers to start from \fIN\fP+1.
- X.TP
- X\fBsave-report\fP (boolean, default true)
- XWhen set, a message reporting the number of lines written is shown
- Xafter saving an article. Since messages are shown for a few seconds,
- Xthis may slow down the saving of many articles (e.g. using the
- X.B S*
- Xcommand).
- X.TP
- X\fBscroll-clear-page\fP (boolean, default true)
- XDetermines whether \fInn\fP clears the screen before showing each new
- Xpage of an article.
- X.TP
- X\fBselect-leave-next\fP (boolean, default false)
- XWhen set, you will be asked whether to select articles with the
- X\fBleave-next\fP attribute on entry to a group with left over
- Xarticles.
- X.TP
- X\fBselect-on-sender\fP (boolean, default false)
- XSpecifies whether the \fBfind\fP (=) command in article selection mode
- Xwill match on the subject or the sender.
- X.TP
- X\fBshell\fP \fIprogram\fP (string, default $SHELL)
- XThe shell program used to execute shell escapes.
- X.TP
- X\fBshell-restrictions\fP (boolean, default false)
- XWhen set (in the init file), \fInn\fP will not allow the user to
- Xinvoke the shell in any way, including saving on pipes. It also
- Xprevents the user from changing certain variables containing commands.
- X.TP
- X\fBsilent\fP (boolean, default false)
- XWhen set, \fInn\fP wont print the logo or "No News" if there are no
- Xunread articles. Only useful to set in the init file or with the
- X.B \-Q
- Xoption.
- X.TP
- X\fBslow-mode\fP (boolean, default false)
- XWhen set, \fInn\fP will cut down on the screen output to give better
- Xresponse time at low speed.
- XNormally, \fInn\fP will use standout mode (if possible) to mark
- Xselected articles on the menu, but when \fBslow-mode\fP is set, \fInn\fP will
- Xjust put an asterisk `*' next to the article identifier on selected
- Xarticles. Also when \fBslow-mode\fP is set \fInn\fP will avoid
- Xredrawing the screen in the following cases: After a \fBgoto-group\fP
- Xcommand an empty menu is shown (hit \fBspace\fP to make it appear),
- Xand after responding to an article, only the prompt line is shown (use
- X^L to redraw the screen). To avoid redrawing the screen aftern an
- Xextended command, set the \fBdelay-redraw\fP variable as well.
- X.TP
- X\fBslow-speed\fP \fIspeed\fP (integer, default 1200)
- XIf the terminal is running at this baud rate or lower, the \fBon
- Xslow\fP (see the section on init files) condition will be true, and
- Xthe \fBon fast\fP will be false (and vice-versa).
- X.TP
- X\fBsort\fP (boolean, default true)
- XWhen set, \fInn\fP will sort articles according to the current
- X\fBsort-mode\fP on entry to a group. Otherwise, articles will be
- Xpresented in order of arrival.
- X.TP
- X\fBsort-mode\fP \fImode\fP (integer, default 1)
- XThe default sort algorithm used to sort the articles on entry to a
- Xnews group. It is a numeric value corresponding to one of the sorting
- Xmethods described in connection with the :sort command:
- X.br
- X 0 \- arrival (no sorting)
- X.br
- X 1 \- subject (subjects ordered after age of first article)
- X.br
- X 2 \- lexical (subjects in lexicographical order)
- X.br
- X 3 \- age (articles ordered after posting date only)
- X.br
- X 4 \- sender (articles ordered after sender's name)
- X.TP
- X\fBspell-checker\fP \fIshell-command\fP (string, default not set)
- XWhen set, responses can be checked for spelling mistakes via the
- X(i)spell action. The command to perform the spelling is given the
- Xfile containing the full article including header as its only
- Xargument. If the spell checker can fix spelling mistakes, it must
- Xapply the changes directly to this file.
- X.TP
- X\fBsplit\fP (boolean, default true)
- XWhen set, digests will automatically and silently be split into
- Xsub-articles which are then handled transparently as normal articles.
- XOtherwise, digests are presented as one article (which you can split
- Xon demand with the
- X.B G
- Xcommand).
- X.TP
- X\fBstop\fP \fIlines\fP (integer, default not set)
- XWhen
- X.B stop
- Xis set, \fInn\fP will only show the first \fIlines\fP lines of the
- Xof each article
- Xbefore prompting you to continue. This is useful on slow terminals and
- Xmodem lines to be able to see the first few lines of longer articles
- X(and skipping the rest with the
- X.B n
- Xcommand).
- X.TP
- X\fBsubject-match-limit\fP \fIlength\fP (integer, default 20)
- XIf one article's subject is identical to the first part of another
- Xarticle, the two subjects will still be considered identical if the
- Xlength of the shorter subject is at least the limit set by this
- Xvariable. This is mainly used to get articles whose subject line has
- Xbeen truncated for some reason (who said notefiles?) aligned with the
- Xproper set of articles anyway.
- X.TP
- X\fBsubject-match-offset\fP \fIoffset\fP (integer, default 0)
- XWhen set to a positive number, that many characters at the beginning
- Xof the subject will be ignored when comparing subjects for ordering
- Xand equality purposes.
- X.TP
- X\fBsubject-match-parts\fP (boolean, default false)
- XWhen set, two subjects will be considered equal if they are identical
- Xupto the first (differing) digit. Together with the
- X\fBsubject-match-offset\fP variable, this can be used in source groups
- Xwhere the subject often has a format like:
- X.sp 0.5v
- X vXXXXXX: Name of the package (Part 01/04)
- X.sp 0.5v
- XSetting \fBsubject-match-offset\fP to 8 and \fBsubject-match-parts\fP
- Xto true will make \fInn\fP consider all four parts of the package
- Xhaving the same subject (and thus be selectable with `*').
- X.sp 0.5
- XNotice that changing the \fBsubject-match-\fP... variables manually
- Xwill not have an immediate effect. To reorder the menu, an explicit
- X\fB:sort\fP command must be performed. These variables are mainly
- Xintended to be set using the \fB:local\fP command in \fBon entry\fP
- Xmacros for source and binary groups (entry macros are evaluated before
- Xthe menu is collected and sorted).
- X.TP
- X\fBsuggest-default-save\fP (boolean, default true)
- XWhen set, \fInn\fP will present the \fBdefault-save-file\fP when
- Xprompting for a save file name in a group without a specific save
- Xfile. When not set, no file name is presented, and to use the default
- Xsave file, a single + must be specified.
- X.TP
- X\fBtidy-newsrc\fP (boolean, default false)
- XWhen set, \fInn\fP will automatically remove lines from .newsrc which
- Xrepresent groups not found in the active file or unsubscribed groups
- Xif \fBkeep-unsubscribed\fP is not set.
- X.TP
- X\fBtime\fP (boolean, default true)
- XWhen set, \fInn\fP will show the current time in the prompt line.
- XThis is useful on systems without a
- X.I sysline (1)
- Xutility.
- X.TP
- X\fBunshar-command\fP \fIshell-command\fP (string, default "/bin/sh")
- XThis is the command which is invoked by the \fBunshar\fP command.
- X.TP
- X\fBunshar-header-file\fP \fIfile\fP (string, default "Unshar.Headers")
- XThe name of the file in which the header and initial text of articles
- Xunpacked with the \fB:unshar\fP command is saved. Unless the file name
- Xstarts with a `/', the file will be created in the same directory as
- Xthe unpacked files. The information is not saved if this variable is
- Xnot set. Setting it to "Unshar.Result" will cause the headers and the
- Xresults from the unpacking process to be merged in a meaningful way
- X(unless \fBmmdf-format\fP is set).
- X.TP
- X\fBunsubscribe-mark-read\fP (boolean, default true)
- XWhen set, unsubscribing to a group will automatically mark all current
- Xarticles read; this is recommended to keep the size of .newsrc down.
- XOtherwise, unread articles in the unsubscribe groups are kept in
- X.newsrc. If \fBkeep-unsubscribed\fP is false, this variable has no
- Xeffect.
- X.TP
- X\fBupdate-frequency\fP (integer, default 1)
- XSpecifies how many changes need to be done to the .newsrc or select
- Xfiles before they are written back to disk. The default setting
- Xcausese .newsrc to be updated every time a group has been read.
- X.TP
- X\fBuse-selections\fP (boolean, default true)
- XWhen set, \fInn\fP uses the selections and other article attributes
- Xsaved last time \fInn\fP was used. If not set, \fInn\fP ignores the
- Xselect file.
- X.TP
- X\fBvisible-bell\fP (boolean, default true)
- XWhen set, \fInn\fP will flash the screeen instead of "ringing the
- Xbell" if the visible bell (flash) capability is defined in the
- Xtermcap/terminfo database.
- X.TP
- X\fBwindow\fP \fIsize\fP (integer, default not set)
- XWhen set, \fInn\fP will reserve the last \fIsize\fP lines of the menu
- Xscreen for a preview window. If not set, \fInn\fP will clear the
- Xscreen to preview an article if there are less than \fBmin-window\fP
- Xlines at the
- Xbottom of the screen. As a side effect, it can also be used to reduce
- Xthe size of the menus, which may be useful on slow terminals.
- X.TP
- X\fBword-key\fP \fIkey\fP (key, default ^W)
- XThe key which erases the last input component or word
- Xwhen \fInn\fP is prompting for a string, e.g. the last name in a path
- Xname.
- X.TP
- X\fBwrap-header-margin\fP \fIsize\fP (integer, default 6)
- XWhen set (non-negative), the customized header fields specified in
- X\fBheader-lines\fP will be split across several lines if they don't
- Xfit on one line. When \fIsize\fP is greater than zero, lines will be
- Xsplit at the first space occurring in the last \fIsize\fP columns of
- Xthe line. If not set (or negative), long header lines will be
- Xtruncated if they don't fit on a single line.
- X.\" ENDPART C
- END_OF_FILE
- if test 41683 -ne `wc -c <'man/nn.1.C'`; then
- echo shar: \"'man/nn.1.C'\" unpacked with wrong size!
- fi
- # end of 'man/nn.1.C'
- fi
- if test -f 'pack_name.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'pack_name.c'\"
- else
- echo shar: Extracting \"'pack_name.c'\" \(10290 characters\)
- sed "s/^X//" >'pack_name.c' <<'END_OF_FILE'
- X/*
- X * (c) Copyright 1990, Kim Fabricius Storm. All rights reserved.
- X *
- X * Pack sender's name into something sensible, return in packed:
- X * pack_name(packed, name, length)
- X *
- X */
- X
- X#include "config.h"
- X
- X/* #define NAME_TEST /* Never define this ! */
- X
- X#define SEP_DOT 0 /* . */
- X#define SEP_PERCENT 1 /* % */
- X#define SEP_SCORE 2 /* _ */
- X#define SEP_AMPERSAND 3 /* @ */
- X#define SEP_BANG 4 /* ! */
- X#define SEP_MAXIMUM 5
- X
- X
- X#define CL_OK 0x0100 /* letter or digit */
- X#define CL_SPACE 0x0200 /* cvt to space */
- X#define CL_IGNORE 0x0400 /* ignore */
- X#define CL_RANGE(c) 0x0800+c /* space range, end with c */
- X#define CL_HYPHEN 0x1000 /* convert to - */
- X#define CL_STOP 0x2000 /* discard rest of name */
- X#define CL_SEP | 0x4000 + /* address separator */
- X
- X#define IS_OK(c) (Class[c] & CL_OK)
- X#define IS_SPACE(c) (Class[c] & CL_SPACE)
- X#define IGNORE(c) (c & 0x80 || Class[c] & CL_IGNORE)
- X#define BEGIN_RANGE(c) (Class[c] & CL_RANGE(0))
- X#define END_RANGE(c) (Class[c] & 0xff)
- X#define IS_HYPHEN(c) (Class[c] & CL_HYPHEN)
- X#define IS_STOP(c) (Class[c] & CL_STOP)
- X#define IS_SEPARATOR(c) (Class[c] & (0 CL_SEP 0))
- X
- Xstatic short Class[128] = {
- X /* NUL */ CL_STOP ,
- X /* SOH */ CL_IGNORE ,
- X /* STX */ CL_IGNORE ,
- X /* ETX */ CL_IGNORE ,
- X /* EOT */ CL_IGNORE ,
- X /* ENQ */ CL_IGNORE ,
- X /* ACK */ CL_IGNORE ,
- X /* BEL */ CL_IGNORE ,
- X /* BS */ CL_IGNORE ,
- X /* TAB */ CL_SPACE ,
- X /* NL */ CL_IGNORE ,
- X /* VT */ CL_IGNORE ,
- X /* FF */ CL_IGNORE ,
- X /* CR */ CL_IGNORE ,
- X /* SO */ CL_IGNORE ,
- X /* SI */ CL_IGNORE ,
- X /* DLE */ CL_IGNORE ,
- X /* DC1 */ CL_IGNORE ,
- X /* DC2 */ CL_IGNORE ,
- X /* DC3 */ CL_IGNORE ,
- X /* DC4 */ CL_IGNORE ,
- X /* NAK */ CL_IGNORE ,
- X /* SYN */ CL_IGNORE ,
- X /* ETB */ CL_IGNORE ,
- X /* CAN */ CL_IGNORE ,
- X /* EM */ CL_IGNORE ,
- X /* SUB */ CL_IGNORE ,
- X /* ESC */ CL_IGNORE ,
- X /* FS */ CL_IGNORE ,
- X /* GS */ CL_IGNORE ,
- X /* RS */ CL_IGNORE ,
- X /* US */ CL_IGNORE ,
- X
- X /* space */ CL_SPACE ,
- X /* ! */ CL_SPACE CL_SEP SEP_BANG,
- X /* " */ CL_RANGE( '"' ) ,
- X /* # */ CL_OK ,
- X /* $ */ CL_OK ,
- X /* % */ CL_OK CL_SEP SEP_PERCENT,
- X /* & */ CL_OK ,
- X /* ' */ CL_OK ,
- X /* ( */ CL_RANGE( ')' ) ,
- X /* ) */ CL_IGNORE ,
- X /* * */ CL_HYPHEN ,
- X /* + */ CL_HYPHEN ,
- X /* , */ CL_STOP ,
- X /* - */ CL_HYPHEN ,
- X /* . */ CL_SPACE CL_SEP SEP_DOT,
- X /* / */ CL_OK ,
- X /* 0 */ CL_OK ,
- X /* 1 */ CL_OK ,
- X /* 2 */ CL_OK ,
- X /* 3 */ CL_OK ,
- X /* 4 */ CL_OK ,
- X /* 5 */ CL_OK ,
- X /* 6 */ CL_OK ,
- X /* 7 */ CL_OK ,
- X /* 8 */ CL_OK ,
- X /* 9 */ CL_OK ,
- X /* : */ CL_IGNORE ,
- X /* ; */ CL_STOP ,
- X /* < */ CL_IGNORE ,
- X /* = */ CL_HYPHEN ,
- X /* > */ CL_IGNORE ,
- X /* ? */ CL_IGNORE ,
- X /* @ */ CL_OK CL_SEP SEP_AMPERSAND,
- X /* A */ CL_OK ,
- X /* B */ CL_OK ,
- X /* C */ CL_OK ,
- X /* D */ CL_OK ,
- X /* E */ CL_OK ,
- X /* F */ CL_OK ,
- X /* G */ CL_OK ,
- X /* H */ CL_OK ,
- X /* I */ CL_OK ,
- X /* J */ CL_OK ,
- X /* K */ CL_OK ,
- X /* L */ CL_OK ,
- X /* M */ CL_OK ,
- X /* N */ CL_OK ,
- X /* O */ CL_OK ,
- X /* P */ CL_OK ,
- X /* Q */ CL_OK ,
- X /* R */ CL_OK ,
- X /* S */ CL_OK ,
- X /* T */ CL_OK ,
- X /* U */ CL_OK ,
- X /* V */ CL_OK ,
- X /* W */ CL_OK ,
- X /* X */ CL_OK ,
- X /* Y */ CL_OK ,
- X /* Z */ CL_OK ,
- X /* [ */ CL_OK ,
- X /* \ */ CL_OK ,
- X /* ] */ CL_OK ,
- X /* ^ */ CL_IGNORE ,
- X /* _ */ CL_SPACE CL_SEP SEP_SCORE,
- X /* ` */ CL_IGNORE ,
- X /* a */ CL_OK ,
- X /* b */ CL_OK ,
- X /* c */ CL_OK ,
- X /* d */ CL_OK ,
- X /* e */ CL_OK ,
- X /* f */ CL_OK ,
- X /* g */ CL_OK ,
- X /* h */ CL_OK ,
- X /* i */ CL_OK ,
- X /* j */ CL_OK ,
- X /* k */ CL_OK ,
- X /* l */ CL_OK ,
- X /* m */ CL_OK ,
- X /* n */ CL_OK ,
- X /* o */ CL_OK ,
- X /* p */ CL_OK ,
- X /* q */ CL_OK ,
- X /* r */ CL_OK ,
- X /* s */ CL_OK ,
- X /* t */ CL_OK ,
- X /* u */ CL_OK ,
- X /* v */ CL_OK ,
- X /* w */ CL_OK ,
- X /* x */ CL_OK ,
- X /* y */ CL_OK ,
- X /* z */ CL_OK ,
- X /* { */ CL_OK ,
- X /* | */ CL_OK ,
- X /* } */ CL_OK ,
- X /* ~ */ CL_HYPHEN ,
- X /* DEL */ CL_IGNORE
- X} ;
- X
- X
- Xpack_name(dest, source, length)
- Xchar *dest, *source;
- Xint length;
- X{
- X register char *p, *q, *r, c;
- X register int n;
- X char namebuf[129], *name;
- X char *maxq;
- X int lname, lfirst, lmiddle, llast, sep, i;
- X int drop_space, prev_space;
- X char *separator[SEP_MAXIMUM];
- X
- X dest[0] = NUL;
- X
- X if (source == NULL || source[0] == NUL)
- X return 0;
- X
- X p = source, q = namebuf, n = 0;
- X maxq = namebuf + sizeof namebuf - 1;
- X
- Xnew_partition:
- X for (i = SEP_MAXIMUM; --i >= 0; separator[i] = NULL);
- X
- X while ( c = *p++ ) {
- X if (c == '<') {
- X while (q > namebuf && q[-1] == SP) q--;
- X if (q == namebuf) continue;
- X break;
- X }
- X if (IGNORE(c)) continue;
- X if (q == namebuf && IS_SPACE(c)) continue;
- X if (c == '(') {
- X if (*p == ')') {
- X p++;
- X continue;
- X }
- X if (n++ == 0) {
- X q = namebuf;
- X goto new_partition;
- X }
- X continue;
- X }
- X if (c == ')') {
- X if (--n == 0) break;
- X continue;
- X }
- X if (n > 1) continue;
- X if (q >= maxq) break;
- X *q++ = c;
- X if (IS_SEPARATOR(c)) {
- X switch (sep = (Class[c] & 0xff)) {
- X
- X case SEP_DOT:
- X if (separator[SEP_AMPERSAND] && q - namebuf <= length)
- X break;
- X continue;
- X
- X case SEP_BANG:
- X if (separator[SEP_AMPERSAND]) continue;
- X break;
- X
- X default:
- X if (separator[sep]) continue;
- X break;
- X }
- X
- X separator[sep] = q - 1;
- X }
- X }
- X
- X *q = NUL;
- X
- X if (namebuf[0] == NUL) return 0;
- X
- X name = namebuf;
- X
- X if (name[0] == '"') {
- X name++;
- X if (q[-1] == '"') *--q = NUL;
- X }
- X
- X if (q - name <= length) goto name_ok;
- X
- X /* sorry for the many goto's -- the 3B2 C compiler does not */
- X /* make correct code for complicated logical expressions!! */
- X /* not even without -O */
- X
- X /* We must pack the name to make it fit */
- X
- X /* Name_of_person%... -> Name_of_person */
- X
- X if (r = separator[SEP_PERCENT]) {
- X if (!(q = separator[SEP_SCORE]) || q > r )
- X goto no_percent;
- X if ((q = separator[SEP_AMPERSAND]) && q < r)
- X goto no_percent;
- X if ((q = separator[SEP_BANG]) && q < r)
- X goto no_percent;
- X *r = NUL;
- X goto parse_name;
- X }
- X
- X no_percent:
- X
- X /* name@site.domain -> name@site */
- X
- X if (r = separator[SEP_AMPERSAND]) {
- X
- X if ((q = separator[SEP_PERCENT]) && q < r) {
- X *r = NUL;
- X if (r - name <= length) goto name_ok;
- X
- X *q = NUL;
- X
- X if (((p = separator[SEP_BANG]) && p < q)
- X || ((p = strrchr(name, '!')) && p < q)) {
- X name = p + 1;
- X }
- X
- X if (strchr(name, '.'))
- X goto parse_name;
- X
- X goto name_ok;
- X }
- X
- X if (q = separator[SEP_DOT]) {
- X *q = NUL;
- X goto name_ok;
- X }
- X
- X *r = NUL;
- X if (r - name <= length) goto name_ok;
- X
- X if ((q = separator[SEP_BANG]) && q < r) {
- X name = q + 1;
- X goto name_ok;
- X }
- X
- X#ifdef NOTDEF
- X if (strchr(name, '!') == NULL)
- X goto parse_name; /* take the chance ... */
- X#endif
- X goto name_ok; /* can't do it any better */
- X }
- X
- X
- X /* Phase 1: Normalization (remove superfluous characters) */
- X
- X parse_name:
- X
- X for (p = name, lname = 0, prev_space = 0; c = *p; p++) {
- X
- X/*
- X if (IGNORE(c)) {
- X *p = TAB;
- X if (p == name) name++;
- X continue;
- X }
- X*/
- X
- X if (IS_OK(c)) {
- X lname++;
- X prev_space = 0;
- X continue;
- X }
- X
- X if (IS_HYPHEN(c)) {
- X if (p == name) {
- X name++;
- X continue;
- X }
- X if (prev_space)
- X *p = TAB;
- X else {
- X *p = '-';
- X lname++;
- X }
- X continue;
- X }
- X
- X if (BEGIN_RANGE(c)) {
- X
- X if (p == name) {
- X name++;
- X continue;
- X }
- X
- X c = END_RANGE(c);
- X for (q = p+1; *q && *q != c; q++);
- X if (*q) {
- X if (p[-1] != ' ') lname++;
- X while (p <= q) *p++ = ' ';
- X p--;
- X prev_space++;
- X continue;
- X }
- X c = ' ';
- X }
- X
- X if (IS_SPACE(c)) {
- X *p = ' ';
- X if (p == name)
- X name++;
- X else
- X if (!prev_space) {
- X lname++;
- X prev_space++;
- X }
- X continue;
- X }
- X
- X if (IS_STOP(c)) {
- X *p = NUL;
- X break;
- X }
- X }
- X drop_last_name:
- X while (p > name && (*--p == ' ' || *p == TAB)) *p = NUL;
- X
- X if (lname < length) goto name_ok;
- X
- X
- X /* Phase 2: Reduce middle names */
- X
- X for (r = p, llast = 0; r > name && *r != ' '; r--)
- X if (*r != TAB) llast++;
- X
- X /* r points to space before last name */
- X
- X if (strncmp(r, " Jr", 3) == 0 || strncmp(r, " II", 3) == 0) {
- X p = r+1;
- X lname -= llast;
- X goto drop_last_name;
- X }
- X
- X if (r == name) goto phase6; /* only last name */
- X
- X for (q = name, lfirst = 0; *q && *q != ' '; q++)
- X if (*q != TAB) lfirst++;
- X
- X /* q points at space after first name */
- X
- X for (p = q, lmiddle = 0; p < r; ) {
- X /* find next middle name */
- X while (p < r && (*p == ' ' || *p == TAB)) p++;
- X
- X if (p >= r) break; /* found last name */
- X
- X p++; /* skip first char of middle name */
- X for (;*p != ' '; p++) { /* remove rest */
- X if (*p == TAB) continue;
- X *p = TAB;
- X lname--;
- X }
- X lmiddle += 2; /* initial + space */
- X }
- X
- X if (lname < length) goto name_ok;
- X
- X /* If removing middle names is not enough, but reducing first name instead is, do it that way */
- X
- X if (lname - lmiddle >= length && lname - lfirst + 1 < length) goto phase4;
- X
- X
- X /* Phase 3: Remove middle names */
- X
- X for (p = q; p < r; p++) {
- X if (*p == TAB) continue;
- X if (*p == ' ') continue;
- X *p = TAB;
- X lname -= 2;
- X }
- X
- X if (lname < length) goto name_ok;
- X
- X
- X /* Phase 4: Reduce first name */
- X
- X phase4:
- X for (p = name+1; p < q; p++) {
- X if (*p == TAB) continue;
- X if (*p == ' ') continue;
- X if (*p == '-' && (p + 1) < q) {
- X p++;
- X continue;
- X }
- X *p = TAB;
- X lname--;
- X }
- X
- X if (lname < length) goto name_ok;
- X
- X /* Phase 5: Remove first name */
- X
- X name = r+1;
- X lname--;
- X
- X if (lname < length) goto name_ok;
- X
- X /* Phase 6: Cut last name */
- X phase6:
- X goto name_ok;
- X
- X name_ok:
- X
- X q = dest;
- X maxq = q + length;
- X
- X drop_space = 1;
- X
- X for (p = name; *p && q < maxq ; p++) {
- X if (*p == TAB) continue;
- X
- X if ( *p == ' ' ) {
- X if (!drop_space) {
- X drop_space = 1;
- X *q++ = ' ';
- X }
- X continue;
- X }
- X drop_space = 0;
- X *q++ = *p;
- X }
- X
- X *q = NUL;
- X
- X return strlen(dest);
- X}
- X
- X#ifdef NAME_TEST
- X
- Xmain() {
- X char in[512], out[512];
- X
- X while (gets(in)) {
- X printf("'%s' -> (%d) ", in, pack_name(out,in,NAME_LENGTH));
- X puts(out);
- X }
- X exit(0);
- X}
- X
- X#endif
- END_OF_FILE
- if test 10290 -ne `wc -c <'pack_name.c'`; then
- echo shar: \"'pack_name.c'\" unpacked with wrong size!
- fi
- # end of 'pack_name.c'
- fi
- echo shar: End of archive 3 \(of 22\).
- cp /dev/null ark3isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 22 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
-
- exit 0 # Just in case...
-